.rs-sidebar-wrapper {
  overflow-x: hidden;
}

.rs-sidebar-wrapper.fixed {
  position: fixed;
  background-color: #f4f5f7;
  width: 260px;
  left: 64px;
  top: 0;
  bottom: 0;
  z-index: 5;

  @media (max-width: @media-xs) {
    visibility: hidden;
    pointer-events: none;

    &.media-sidebar-show {
      visibility: visible;
      pointer-events: all;
      animation: slide-in-left 0.3s ease-in-out;
      left: 0;
      z-index: 999;
    }
  }

  .media-close-side-bar-button {
    display: none;

    @media (max-width: @media-xs) {
      display: block;
      position: absolute;
      right: 10px;
      top: 16px;
    }
  }

  .title-wrapper {
    padding: 20px 20px 10px 20px;
    font-size: 20px;

    i {
      font-size: 20px;
    }
    svg {
      vertical-align: middle;
      margin-top: -2px;
      margin-right: 4px;
      fill: currentColor;
    }
  }
}

.rs-theme-dark,
.rs-theme-high-contrast {
  .rs-sidebar-wrapper.fixed {
    background-color: #1a1d24;
  }
}

.rs-sidebar-media-backdrop {
  @media (max-width: @media-xs) {
    background-color: var(--rs-bg-backdrop);
    position: fixed;
    width: 100vw;
    height: 100vh;
    display: none;
    z-index: 1;

    &.media-sidebar-show {
      display: block;
    }
  }
}

.media-toggle-side-bar.rs-btn.rs-btn-icon {
  position: fixed;
  top: (@top-level-nav-height + 10px);
  z-index: 1;
  box-shadow: @box-shadow;

  @media (min-width: @media-xs) {
    display: none;
  }
}

.rs-nav.nav-docs {
  overflow: auto;
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  top: 80px;
  padding: 0 10px;

  .rs-nav-item {
    font-weight: 400;
    color: inherit;
    transition: none;
    border-radius: 2px;
    padding-left: 20px;
  }
  .rs-nav-item-active {
    color: var(--rs-navs-selected);
    font-weight: bold;
  }

  .title-zh {
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.5;
  }
  .rs-nav-item-panel {
    padding: 20px 12px 12px 12px;
    color: #aaa;
    border-bottom: 1px solid var(--rs-border-primary);
  }

  // Scrollbar
  &::-webkit-scrollbar {
    border-radius: (@scrollbar-width / 2);
    width: @scrollbar-width;
  }

  // Handle
  &::-webkit-scrollbar-thumb {
    border-radius: (@scrollbar-width / 2);
    background-color: fade(#8d8d8d, 30);
    &:hover {
      background-color: fade(#8d8d8d, 90);
    }
  }

  // Track
  &::-webkit-scrollbar-track {
    border-radius: (@scrollbar-width / 2);
    background: transparent;
  }
}

.submenu-close {
  .rs-nav.nav-docs {
    overflow: hidden;
  }
}
